/**
 * @param {number[]} nums
 * @param {number} k
 * @return {number}
 */
 var largestSumOfAverages = function(nums, k) {
  let res = []
  let path = []
  function backtracking(arr,n){
    if(path.length===k){
      res.push([...path])
    }
    for(let i=n;i<arr.length;i++){
      path.push(arr[i])
      backtracking(arr,i+1)
      path.pop()
    }
  }
};